1. Field of the Invention
The present invention relates to a communication apparatus and a method of communication by the communication apparatus, as well as to a storage medium storing a program for implementing the method, and more particularly to a technique for constructing a platform which makes it possible for a communication apparatus having a plurality of network interfaces to operate without requiring an application operating in an upper layer to be conscious of the number of the network interfaces.
2. Description of the Related Art
Conventionally, a method called multicast or broadcast is generally employed when an application operating in a multifunction peripheral or a printer searches for another multifunction peripheral or printer, a personal computer, a server, etc. on a TCP/IP network.
Multicast is a method of simultaneously transmitting data to a plurality of nodes on a network. This method makes it possible to transmit the same data to nodes belonging to a specific group called a multicast group. In a search performed using multicast, a device (a printer, a multifunction peripheral, etc.) as a search target which is searched for belongs to a predetermined multicast group, and a device which performs the search sends out a multicast packet addressed to the multicast group. Upon receipt of the multicast packet, the device as the search target sends a response packet to the sender, using unicast. The sender, i.e. the device which performs the search refers to address information and name information on a node contained in the response packet, to thereby identify the node. In general, a device search using multicast is performed in the above-described procedure. It should be noted that above-mentioned unicast is a method in which a single node is designated as a destination.
On the other hand, broadcast is a technique of simultaneously transmitting a packet to an unspecified number of nodes on a network. In a search performed using broadcast, a device which performs the search transmits a broadcast packet. When receiving the broadcast packet, a device as a search target sends a response packet to the sender, using unicast. The sender, i.e. the device which performs the search refers to address information and name information on a node contained in the response packet, to thereby identify the node. In general, a device search using broadcast is performed in the above-described procedure.
Recently, in developing software which operates on a multifunction peripheral or a printer, there has been an increasing tendency to improve development efficiency by using a source code that is common for different platforms and device models. This is useful for developing software in a shorter time period in recent product planning in which it is general to develop a plurality of models in parallel at the same time. More specifically, by using a common source code as much as possible between models different in hardware configuration or optional equipment, it is possible to reduce the number of software development steps to thereby develop a product in a shorter time period and at lower costs.
As a technique of sharing the source code of an application program between such products, a method of installing a Java (registered trademark) platform in a printer, a multifunction peripheral or the like is coming into widespread use. Java (registered trademark) software operates without being dependent on a specific OS (Operating System) or a CPU (Central Processing Unit). Therefore, an application developer is required to create a single application using Java (registered trademark) whereby it is possible to support all products on which the Java (registered trademark) platform is installed.
Further, in recent printers and multifunction peripherals, there have been an increasing number of models having a plurality of network interfaces as standard equipment or optional equipment. In one example of configuration, a model has an Ethernet (registered trademark) interface as standard equipment and a wireless LAN (Local Area Network) interface as optional equipment. These network interfaces can be used at the same time. A system configuration enabling the simultaneous use of multiple network interfaces is called “multihoming”, and it is employed not only in a printer or a multifunction peripheral. It should be noted that the number of multiple network interfaces is not limited to two. Although not general, a device which is capable of operating three or more network interfaces at the same time is also considered to be multihomed. For example, there has been proposed a technique of configuring a multihomed device such that a packet received via one network interface is transferred to another network interface depending on specific conditions (see e.g. Japanese Patent Laid-Open Publication No. 2004-32076).
However, in a case where an application for performing multicast or broadcast transmission is operated on a multihomed device having the above-described system configuration of multihoming, there occur problems described below. For example, if a program code for executing multicast or broadcast transmission is described using a standard code using the C language as a general program language or Java (registered trademark), it usually can send packets to a single interface alone. In general, in a case where an application that operates on a multihomed device transmits a multicast or broadcast packet so as to search for a device on a network, it is envisaged as a basic operation to transmit the packet from all network interfaces of the device.
Further, when an application developed using the C language or Java (registered trademark) mentioned above is operated on a multihomed device, a packet is delivered to only one of multiple network interfaces, and hence it sometimes occurs that only nodes connected to the network interface can be searched. In such a case, if it is attempted to cause a multicast or broadcast packet to be delivered to all the network interfaces constituting the multihome, it is required to write a dedicated program code. For example, to cause a multicast packet to be delivered to a plurality of network interfaces by a program code written using the C language, it is required to describe a sequence of processes for designating IP_MULTICAST_IF as the fourth argument of setsockopt( ) and designating the interfaces to which the multicast packet is to be sent. As described above, in order to develop an application that delivers a multicast or broadcast packet to all network interfaces on a multihomed device, it is required to incorporate a dedicated code in the application.
On the other hand, an application developed for a conventional device provided with a single network interface does not incorporate a dedicated code for performing multicast or broadcast transmission in a multihome environment, which makes it impossible to make the code common between different devices. Particularly in the case of a Java (registered trademark) application for recent multifunction peripherals, specifications of the Java (registered trademark) platform of each multifunction peripheral is disclosed, and application development is being executed based on the premise of the use of a Java application in the multifunction peripheral. In such a case, it can be envisaged to use an application originally developed assuming the use of a single network interface also in a multihomed device, which brings about a significant problem.
Further, in Japanese Patent Laid-Open Publication No. 2004-32076 mentioned above, there has been proposed a method of controlling a plurality of network interfaces, including transferring a packet received via one network interface to another network interface, on a multihomed device. In addition, for a general route, a technique has conventionally been proposed in which a packet received via one network interface is transferred to another single interface or other network interfaces. However, these techniques perform control by software coded specifically for a device having a particular device configuration, and hence are not suitable for the use of an application being operated on a plurality of hardware devices having various different device configurations.
Further, there is a need for controlling interfaces via which a multicast or broadcast packet is to be transmitted, from the viewpoint of security and userfriendliness. For example, a user who logs in to a multifunction peripheral may be a guest user or a highly authorized user, and hence there is sometimes a case where an accessible network is desired to be limited according to user's rights. Now, let it be assumed that one network interface of a multihomed device is connected to a first LAN accessible by a guest user, and the other network interface of the same is connected to a second LAN with high confidentiality. In this case, it is preferred that when a guest user accesses the network by operating the multifunction peripheral, the multifunction peripheral can only connect to the first LAN alone, whereas when a highly authorized user operates the multifunction peripheral, the multifunction peripheral can connect to both the first LAN and the second LAN. In other words, besides the problem that multicast or broadcast transmission cannot be performed via all the network interfaces of the multihomed device, there is also a problem unless a network interface via which a packet is to be transmitted cannot be controlled, it is undesirable from the viewpoint of security and userfriendliness.